<?php
namespace Admin\Model;
use Think\Model;
use Think\Upload;
class FriendsModel extends Model{
	protected $tableName = 'friends';

	protected $_auto = array(
		array('addtime','time',1,'function'),
		array('endtime','myfunc',1,'callback'),
		);
	protected $_validate = array(
		array('name','require','标题不能为空'),
		array('url','require','url不能为空'),
		array('url','url','链接格式不正确'),
		array('des','require','描述不能为空'),
		);
	protected function myfunc($time){
		return strtotime($time);
	}
}